//
//  MJListCell.m
//  测试1.1
//
//  Created by 王志盼 on 15/2/4.
//  Copyright (c) 2015年 王志盼. All rights reserved.
//

#import "MJListCell.h"
#import "MJTextData.h"

@interface MJListCell ()
@property (nonatomic, weak) UIView *line;
@end

@implementation MJListCell

+ (instancetype) listCellWithTableView:(UITableView *)tableView
{
    static NSString *ID = @"text";
    return [tableView dequeueReusableCellWithIdentifier:ID];
}

- (void)awakeFromNib
{
    UIView *line = [[UIView alloc] init];
    line.backgroundColor = [UIColor blackColor];
    [self.contentView addSubview:line];
    line.alpha = 0.2;
    self.line = line;
}

- (void)setData:(MJTextData *)data
{
    _data = data;
    self.textLabel.text = data.title;
    self.textLabel.textColor = [UIColor blackColor];
    //NSLog(@"%@",self.textLabel.text);
}
- (void)layoutSubviews
{
    [super layoutSubviews];
    CGFloat lineW = self.frame.size.width;
    CGFloat lineH = 1;
    CGFloat lineX = 0;
    CGFloat lineY = self.frame.size.height - lineH;
    self.line.frame = CGRectMake(lineX, lineY, lineW, lineH);
}
@end